package cn.sfrog.project.biz.admin.task;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component;

/**
 * 异步任务执行器
 */
@Component
public class AsyncExecutor {
    @Autowired
    private ThreadPoolTaskExecutor poolTaskExecutor;

    public void executeAsync(Runnable task){
        poolTaskExecutor.execute(task);
    }
}
